package com.dsr.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * (Flower)实体类
 *
 * @author dsr
 * @since 2020-08-16 02:17:57
 */
@Getter
@Setter
@ToString
@ApiModel("(Flower)实体类")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Flower implements Serializable {
    private static final long serialVersionUID = 512252262919101429L;
    @Id
    private String id;

    private Long collectNumber;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date createDate;

    private Integer del;

    private String description;

    private String imgUrl;

    private Double oldPrice;

    private Double price;

    private Long sales;

    private String section;

    private Integer number;

    private String title;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date updateDate;
    @Transient
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date queryDate;
}
